package cn.hls.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.hls.dao.UserRoleDao;
import cn.hls.entity.UserRole;
import cn.hls.entity.vo.PageInfo;
import cn.hls.service.UserRoleService;

/**
 * @fileName: UserRoleServiceBean.java
 * @package: com.bangni.service.impl
 * @Description: 用户角色Service接口
 * @author: yinghui.zhang
 * @email: uuhui@163.com
 * @date: 2015-5-2
 */
@Service("userRoleService")
public class UserRoleServiceBean extends BaseServiceBean<UserRole> implements
		UserRoleService {
	@Resource(name = "userRoleDaoImpl")
	private UserRoleDao userRoleDao;


	@Override
	public PageInfo<UserRole> loadUserRoleInfo(PageInfo<UserRole> page,
			Long roleId, Long userId) throws Exception {
		return userRoleDao.loadUserRoleInfo(page, roleId, userId);
	}

	@Override
	public List<UserRole> loadUserRoleInfo(Long roleId, Long userId)
			throws Exception {
		return userRoleDao.loadUserRoleInfo(roleId, userId);
	}

	@Override
	public void deleteUserRole(Long roleId, Long userId) throws Exception {
		userRoleDao.deleteUserRole(roleId, userId);
	}

}
